package com.voa.web.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.team4.web.action.GenericAction;

import com.voa.domain.BlogTags;
import com.voa.service.BlogTagsService;

/**
 * <p>程序名称：       BlogTagsAction.java</p>
 * <p>程序说明：       日志标签Action</p>
 * <p>版权信息：       Copyright 深圳市维远泰克科技有限公司</p>
 * <p>时间：          Feb 12, 2011 9:23:37 AM</p>	
 * 
 * @author：          Marker.King
 * @version：         Ver 0.1
 */
@Controller
@Scope("prototype")
public class BlogTagsAction extends GenericAction {

	private static final long serialVersionUID = -5555262970152961896L;
	@Autowired
	private BlogTagsService blogTagsService;
	
	private BlogTags blogTags;
	
	public String listPagination() throws Exception {
		page = blogTagsService.listPagination(page);
		return SUCCESS;
	}
	
	public String toSave() throws Exception {
		return SUCCESS;
	}
	
	public String save() throws Exception {
		blogTagsService.saveBlogTags(blogTags);
		return SUCCESS;
	}
	
	public String toUpdate() throws Exception {
		blogTags = blogTagsService.findBlogTagsById(blogTags.getId());
		return SUCCESS;
	}
	
	public String update() throws Exception {
		blogTagsService.updateBlogTags(blogTags);
		return SUCCESS;
	}
	
	public String delete() throws Exception {
		blogTagsService.deleteBlogTags(idList);
		return SUCCESS;
	}

	public BlogTags getBlogTags() {
		return blogTags;
	}

	public void setBlogTags(BlogTags blogTags) {
		this.blogTags = blogTags;
	}
}
